function onSelectDraggable(e)
{
	if(SelectionInst == null) return;

	SelectionInst.FocusDraggable(e.currentTarget);
}

var SelectionInst = null;
var Selection = function()
{
	this.curDroppable = null;	// focused droppable
	this.curDraggable = null;

	this.FocusDroppable = function(droppable)
	{
		if(this.curDroppable != null)
		{
			// remove the highlight style
			this.curDroppable.style.outline = "";
		}

		// apply highlight style to current droppable
		if(droppable != null)
		{
			droppable.style.outline = "#FF9900 solid 2px";
		} 
		this.curDroppable = droppable;
	}

	this.FocusDraggable = function(draggable)
	{
		if(this.curDraggable != null)
		{
			// remove the highlight style
			this.curDraggable.style.boxShadow = "";
		}

		// apply highlight style to current draggable
		if(draggable != null)
		{
			draggable.style.boxShadow = "3px 3px 3px #333333";
		}
		this.curDraggable = draggable;
	}
}